package com.yitao.cms.constant;

/**
 * @author hjc
 * @date: 2018/6/4 0004
 * Function:
 */
public enum UserErrorEnum {
    USER_NULL("20001", "用户名不存在"),
    USERS_PASSWORD_EROOR("20002", "密码不正确"),
    PASSWORD_ENCRYPT_EORR("20003", "加密失败"),
    USER_DISABLE("20005", "用户已被禁用"),
    USER_ASSECC_PERMISSION("20006", "用户无权限"),
    USER_PHONE_EXIST("20010", "手机已注册"),
    USER_USERNAME_EXIST("20011", "用户名已存在"),

    NULL_LOGIN("9903", "未登录请重新登录"),

    USER_UNKNOWN("20014", "未知用户类型"),
    USER_NOT_EXIST("20010", "用户不存在"),
    UPDATE_SIGNATURE_ERROR("20018", "修改用户签名失败"),
    UPDATE_NICKNAME_ERROR("20019", "修改用户昵称失败"),
    UPDATE_PASSWORD_ERROR("20020", "修改密码失败"),
    VERIFY_CODE_ERROR("2021", "短信验证码错误，请重新输入"),
    VERIFY_NOT_FOND("2022", "短信验证码还未发送"),
    GET_USER_SESSION_ERROR("9903", "获取用户登录信息失败"),
    PARAM_IS_NULL("2024", "输入信息不完整"),
    USER_USERNAME_PASSWORD_NULL("2025", "账号或密码不能为空"),
    USER_LOGIN_PASSWORD("2026", "账号或密码错误"),
    USER_PASSWORD_MATCH_ERROR("2027", "两次密码不一致"),
    USER_OLD_PASSWORD_ERROR("2028", "原密码错误");

    private String code;
    private String desc;

    UserErrorEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "UserErrorEnum{" +
                "code='" + code + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }
}
